package com.groupname.dangerousdelves;

import java.util.List;

// -------------------------------------------------------------------------
/**
 *  This interface handles user input.
 *
 *  @author Chris Fieldman (Chrisf90)
 *  @version 2012.11.13
 */ public interface Input
 {
     /**
      *  This interface responds to key based user input.
      *
      *  @author Chris Fieldmn
      *  @version 2012.11.13
      */
     public static class KeyEvent
     {
         //~--------------------------------------------------------------------
         // Member Variables
         /**
          * Represents a key that is pressed.
          */
         public static final int KEY_DOWN = 0;
         /**
          * Represents a key that is not pressed.
          */
         public static final int KEY_UP = 1;

         public int type;
         public int keyCode;
         public char keyChar;
     }

     // ------------------------------------------------------------------------
     /**
      *  This interface handles touch based user input.
      *
      *  @author Chris Fieldman (Chrisf90)
      *  @version 2012.11.13
      */
     public static class TouchEvent
     {
         //~--------------------------------------------------------------------
         // Member Variables
         public static final int TOUCH_DOWN = 0;

         public static final int TOUCH_UP = 1;

         public static final int TOUCH_DRAGGED = 2;

         public int type;

         public int x, y;

         public int pointer;
     }

     //~------------------------------------------------------------------------
     // Methods
     public boolean isKeyPressed(int keyCode);

     public boolean isTouchDown(int pointer);

     public int getTouchX(int pointer);

     public int getTouchY(int pointer);

     public float getAccelX();

     public float getAccelY();

     public float getAccelZ();

     public List<KeyEvent> getKeyEvents();

     public List<TouchEvent> getTouchEvents();
 }
